package com.hhkj.sms.common.factory;

import com.hhkj.sms.common.cont.PlatformEnum;
import com.hhkj.sms.service.SmsSendService;
import com.hhkj.sms.service.impl.AliDaYuSmsSendServiceImpl;

/**
 * SendImplFactory
 *
 * @author HHKJ-SERVER-ZJ
 * @since 2023/10/24 15:38
 */
public class SendServiceFactory {

    private static final SmsSendService aliDaYunSendService = new AliDaYuSmsSendServiceImpl();

    /**
     * 根据平台类型获取对应短信发送的实现类
     * @param platform 平台类型
     * @return 短信发送实现类
     */
    public static SmsSendService getService(PlatformEnum platform) {
        if (PlatformEnum.ALI_DA_YU.equals(platform)) {
            return aliDaYunSendService;
        }
        throw new RuntimeException("暂不支持其他平台短信对接");
    }
}
